#!/bin/bash

SED=$(which sed)
GREP=$(which grep)
HEAD=$(which head)
LYNX=$(which lynx)
ADDRESS="http://websro.correios.com.br/sro_bin/txect01$.QueryList?P_LINGUA=001&P_TIPO=001&P_COD_UNI=$1"

$LYNX --source "$ADDRESS" |     \
        $GREP '<tr><td' |       \
        $HEAD -1 |              \
        $SED 's/<[^>]*>/ /g'
